﻿using System;
using System.Collections.Generic;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace WebSite_CodeMan.Sys_CodeMan_Manage
{
    public partial class Admin_Link_Mes : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            BaseClass.BaseClass.CheckState();
            if (!IsPostBack)
            {
                LoadData();
            }
        }

        private void LoadData()
        {
            RpLinkMes.DataSource = BLL.LinkInfo.GetLinkMes("");
            RpLinkMes.DataBind();
        }

        protected void RpLink_ItemCommand(object source, RepeaterCommandEventArgs e)
        {
            if (e.CommandName == "Del")
            {
                if (BLL.LinkInfo.DelLinkMes((e.CommandArgument.ToString())))
                {
                    Common.MessageBox.Show(Page, "链接信息删除成功...",  "Admin_Link_Mes.aspx","seuss");
                }
                else
                {
                    Common.MessageBox.Show(Page, "链接信息删除失败，请重试或联系技术人员...", "Admin_Link_Mes.aspx", "errer");
                }
            }
        }
    }
}
